package cn.demoxy.model.entity;

import cn.demoxy.base.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @auther demo
 * @date 2022/5/17 21:33
 * 用户实体类
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ApiModel(value="DemoUser对象", description="用户表")
public class DemoUser extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "用户名")
    private String username;

    @ApiModelProperty(value = "用户密码")
    private String password;

    @ApiModelProperty(value = "电话号码")
    private String phone;

    @ApiModelProperty(value = "邮箱")
    private String email;

    @ApiModelProperty(value = "是否被禁用(0为未禁用 ,1为禁用)")
    private String enableFlag;

    @ApiModelProperty(value = "用户头像")
    private String userFace;

    @ApiModelProperty(value = "用户真实姓名")
    private String name;

    @ApiModelProperty(value = "盐")
    private String salt;

    @ApiModelProperty(value = "角色名称id")
    @TableField(exist = false)
    private List<String> roleIds;

    @ApiModelProperty(value = "角色名称")
    @TableField(exist = false)
    private List<DemoRole> roles;

    @ApiModelProperty(value = "在线时长")
    @TableField(exist = false)
    private String loginTimes;



}